package com.coocaa.typhoon.api.v1.mysql.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.coocaa.typhoon.api.v1.mysql.model.entity.UserFileEntity;
import com.coocaa.typhoon.api.v1.mysql.service.base.UserFileBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author bijiahao
 * @date : 2025/9/22 21:13
 * @description
 */
@Service
public class UserFileQueryService {
    @Autowired
    private UserFileBaseService userFileBaseService;

    public Integer testCount(String userId){
        return userFileBaseService.getBaseMapper().queryCount(userId);
    }

    public List<UserFileEntity> queryByUserId(String userId) {
        LambdaQueryWrapper<UserFileEntity> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(UserFileEntity::getUserId, userId);
        List<UserFileEntity> list = userFileBaseService.list(queryWrapper);
        return list;
    }

}
